import React from "react";
import {Table, TableTbody, TableTr, TableTh, TableTd} from "@mantine/core";

export const IpdSimuConfigDisp = ({
  utilization,
  granularity,
  transRange,
  transRule,
  errSimu,
}: {
  utilization: number;
  granularity: string;
  transRange: string;
  transRule: string;
  errSimu: boolean;
}) => {
  return (
    <Table variant="vertical" layout="fixed">
      <TableTbody>
        <TableTr>
          <TableTh w={160}>带宽利用率</TableTh>
          <TableTd>{utilization}</TableTd>
        </TableTr>

        <TableTr>
          <TableTh>最小颗粒度</TableTh>
          <TableTd>{granularity} </TableTd>
        </TableTr>

        <TableTr>
          <TableTh>转换规则（范围）</TableTh>
          <TableTd>{transRange}</TableTd>
        </TableTr>

        <TableTr>
          <TableTh>转换规则（方式）</TableTh>
          <TableTd>{transRule}</TableTd>
        </TableTr>

        <TableTr>
          <TableTh>故障轮询</TableTh>
          <TableTd>{errSimu ? "启用" : "未启用"}</TableTd>
        </TableTr>
      </TableTbody>
    </Table>
  );
};
